import Vue from 'vue'

import Cookies from 'js-cookie'
import 'normalize.css/normalize.css'
import Element from 'element-ui'
import './styles/element-variables.scss'
import '@/styles/index.scss'

import App from './App'
import store from './store'
import router from './router'

import './icons'
import './permission'
import './utils/error-log'
import './assets/fonts/iconfont.css'
import * as filters from './filters'
Vue.use(Element, {
  size: Cookies.get('size') || 'medium'
})
import BaiduMap from 'vue-baidu-map';
Vue.use(BaiduMap, {
  /* 需要注册百度地图开发者来获取你的ak */
  ak: 'sKrOZGXxifZ1r7Ot7Bm1OoBWd6DILGfH'
});

import EnumBtn from "./components/EnumBtn"
import SearchForm from "./components/SearchForm"
import TableData from "./components/TableData"
import BtnSlot from "./components/BtnSlot"
Vue.component('EnumBtn', EnumBtn);
Vue.component('SearchForm', SearchForm);
Vue.component('BtnSlot', BtnSlot);
Vue.component('TableData', TableData);
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
Vue.config.silent = true;
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
